package com.laxia.model;

import com.laxia.enums.TokenTypeEnum;
import com.laxia.util.NumberUtil;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author weishuai
 * @since 2019-09-17
 */
@Data
@Accessors(chain = true)
public class UserSession {

    private Long userId;
    private String userName;
    private String realName;
    private String email;
    private String mobile;
    private int status;
    private int isAdmin;
    private TokenTypeEnum tokenTypeEnum;

    public static UserSession DEFAULT = new UserSession();

    public boolean isLogin() {
        return NumberUtil.isPositive(userId);
    }

}
